var path = require('path');
var rootPath = path.normalize(__dirname + '/..');

module.exports = {
    db: {
    		'atwork' : {
		        url : 'mongodb://127.0.0.1/attendance',
		        options : {}
		   	}
   		},
	root: rootPath,
	logPath	   : path.join(rootPath, 'logs'),
	httpPort: 3000,
	app: { name: 'attendance'},
	currEvn : 'test',
	remote : {
				'atwork' :
					{
						test: {
				            url : 'https://atwork.foreveross.com/tta',
				            msgImgUrl : 'http://112.124.102.52:8000/img/push-title-img.jpg',
				            msgDetailUrl: 'http://172.16.1.97:4000/schedule_detail/index.html?scheduleID='
						},

						production : {
							url :   'https://atwork.foreveross.com',
							msgImgUrl : 'http://112.124.102.52:8000/img/push-title-img.jpg',
							msgDetailUrl: 'http://172.16.1.97:4000/schedule_detail/index.html?scheduleID='
						}
					}
	},

	//配制admin用户
	users : {
		'admin' : {
			id     : 'admin',
			pwd    : 'admin',	//密码
			userName :'atwork管理员',
			tenant : 'atwork'	//租户
		}
	},
	
    constant:	{
		SUCCESS:	"success"		//后台运行成功时返回内容
    },

	//错误码定义
	errorCode : {
		server404  : 'err404',
		server500  : 'err500',
	
		//通用错误码及提示语，以err001开头
		returnError : "err00101",					//后台出错，返回错误,
		signInDistanceError : "err00200",			//打卡距离不够
		noLogin : "err00104",						//未登录错误
		tokenAuthError : "err00105",				//鉴权失败
		loginAuthError : "err0016", 				//登录失败
		serverError : "err00107",					//服务器异常
        databaseError : "err00108",					//数据库异常
        remoteGetUserError : 'err00109',            //远程获取用户信息出错
        dataVersionError    : 'err00110',           //数据版本异常修改的数据不是最新,数据乐观锁
		onlyOneError : "err00112"					//同时存在多条有效数据异常
	}

};